home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX 6.2 Applications 1996 May
/
SGI IRIX 6.2 Applications 1996 May.iso
/
dist
/
impr_dev.idb
/
usr
/
include
/
Sgm
/
PrintOptionPanel.h.z
/
PrintOptionPanel.h
Wrap
C/C++ Source or Header
|
1996-05-06
|
5KB
|
145 lines
/**************************************************************************
*
* Copyright (c) 1993 Silicon Graphics, Inc.
* All Rights Reserved
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
*
* The copyright notice above does not evidence any actual of intended
* publication of such source code, and is an unpublished work by Silicon
* Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is
* the property of Silicon Graphics, Inc. Any use, duplication or
* disclosure not specifically authorized by Silicon Graphics is strictly
* prohibited.
*
* RESTRICTED RIGHTS LEGEND:
*
* Use, duplication or disclosure by the Government is subject to
* restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
* Technical Data and Computer Software clause at DFARS 52.227-7013,
* and/or in similar or successor clauses in the FAR, DOD or NASA FAR
* Supplement. Unpublished - rights reserved under the Copyright Laws of
* the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.
* Shoreline Blvd., Mountain View, CA 94039-7311
**************************************************************************
*
* File: PrintOptionPanel.h
*
* Description: header file for the printer specific option panel handling
* functions.
*
**************************************************************************/
#ident "$Revision: 1.2 $"
#ifndef _PUI_PRINTOPTIONPANEL_H_
#define _PUI_PRINTOPTIONPANEL_H_
#include <sys/types.h>
/* Callback reasons */
#define PuiCR_OPTION_NONE 0
#define PuiCR_OPTION_ERROR 1
#define PuiCR_OPTION_MAP 2
#define PuiCR_OPTION_DATA 3
#define PuiCR_OPTION_DEATH 4
/* Callback names */
typedef enum {
PuiNoptionPanelErrorCallback,
PuiNoptionPanelMapCallback,
PuiNoptionPanelDeathCallback,
PuiNoptionPanelDataCallback
} PuiOptionPanelCallbackName;
/* Callback structure and macros */
typedef struct _PuiOptionPanelCallbackStruct {
int reason; /* Callback reason */
/* Error callback fields */
int errorCode; /* Error code */
/* Map callback fields */
Window wid; /* Option panel X window ID */
/* Data callback fields */
char *options; /* Printer specific option string */
} PuiOptionPanelCallbackStruct;
#define _PUI_CALLBACK_PROC(func) \
void (func)(struct _PuiOptionPanel*, XtPointer, \
PuiOptionPanelCallbackStruct*)
/* Printer option panel structure */
typedef struct _PuiOptionPanel {
char *name; /* Name of the printer */
char *pathname; /* Pathname of option panel program */
Widget parent; /* Widget ID of parent */
pid_t pid; /* Process ID of the option panel program */
int dataFd; /* Option panel stdout data pipe */
int ptyFd; /* Master side of the psuedo-terminal */
XtInputId inputId; /* Xt input select ID for our pipe fd */
Window wid; /* Option panel top level window ID */
Widget shell; /* Shell ancestor of parent widget */
Boolean wantWID; /* True = look for window ID in map events */
Boolean followParent; /* True = follow parent mapping changes */
XSizeHints sizeHints; /* Info for mapping when following parent */
XWMHints stateHints; /* Info for mapping when following parent */
_PUI_CALLBACK_PROC(*errorCallback); /* Error callback function */
_PUI_CALLBACK_PROC(*mapCallback); /* Panel mapping callback */
_PUI_CALLBACK_PROC(*deathCallback); /* Panel death callback */
_PUI_CALLBACK_PROC(*dataCallback); /* Data available callback */
XtPointer errorClientData; /* Error callback client data */
XtPointer mapClientData; /* Map callback client data */
XtPointer deathClientData; /* Death callback client data */
XtPointer dataClientData; /* Data callback client data */
} PuiOptionPanel;
/* Option panel command line arguments structure */
typedef struct _PuiOptionPanelArgs {
char *userName; /* User login name */
char *filenames; /* Whitespace separated string of filenames */
char *options; /* Printer specific option string */
char **clientXtOptions; /* Xt client command line switches */
int numClientXtOptions; /* Number of Xt client switches specified */
} PuiOptionPanelArgs;
/* Callback type - needs to be after option panel struct definition */
typedef _PUI_CALLBACK_PROC(PuiOptionPanelCallbackProc);
/* Public functions */
#ifdef __cplusplus
extern "C" {
#endif
extern Boolean _PuiOptionPanelExists(const char *printerName);
extern Boolean _PuiOptionPanelAlive(PuiOptionPanel *panel);
extern PuiOptionPanel* _PuiOptionPanelCreate(Widget parent,
const char *printerName, Boolean followParent);
extern void _PuiOptionPanelDestroy(PuiOptionPanel *panel);
extern void _PuiOptionPanelSetCallback(PuiOptionPanel *panel,
PuiOptionPanelCallbackName callbackName,
PuiOptionPanelCallbackProc callbackProc,
XtPointer clientData);
extern void _PuiOptionPanelExec(PuiOptionPanel *panel,
const PuiOptionPanelArgs *args);
extern void _PuiOptionPanelKill(PuiOptionPanel *panel,
Boolean notify);
#ifdef __cplusplus
}
#endif
#endif /* _PUI_PRINTOPTIONPANEL_H_ */